package com.front.teacher.teacherapp.view.fragment;


import android.content.Intent;
import android.widget.ImageView;

import com.front.teacher.teacherapp.R;
import com.front.teacher.teacherapp.base.BaseFragment;
import com.front.teacher.teacherapp.presenter.EvidencePresenter;
import com.front.teacher.teacherapp.view.activity.evidence.PostEvidenceActivity;
import com.front.teacher.teacherapp.view.impl.IEvidenceView;

import butterknife.ButterKnife;
import butterknife.InjectView;
import butterknife.OnClick;

/**
 * 发证据碎片
 */
public class EvidenceFragment extends BaseFragment<IEvidenceView, EvidencePresenter> implements IEvidenceView {
    public static EvidenceFragment evidenceFragment;
    @InjectView(R.id.image_post_evidence)
    ImageView imagePostEvidence;

    public static EvidenceFragment newInstance() {
        if (evidenceFragment == null) {
            evidenceFragment = new EvidenceFragment();
        }
        return evidenceFragment;
    }

    @Override
    public EvidencePresenter initPresenter() {
        return new EvidencePresenter(this);
    }

    @Override
    public int getLayoutId() {
        return R.layout.fragment_evidence;
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void initView() {

    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        ButterKnife.reset(this);
    }

    @OnClick(R.id.image_post_evidence)
    public void onClick() {
        Intent intent = new Intent(getContext(), PostEvidenceActivity.class);
        startActivity(intent);
    }
}
